package com.ice.work.moment.crawler.dao.trading;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ice.work.moment.facade.crawler.model.Trading;
import org.springframework.stereotype.Repository;

/**
 * @Description trading dao
 * @Author DELL
 * @Create 2019-01-10
 * @Since 1.0.0
 */
@Repository
public class TradingRepository extends ServiceImpl<ITradingMapper, Trading> implements ITradingRepository {


    @Override
    public Trading findByShareIdAndTradingAtAndDataStatus(Trading trading) {
        return this.baseMapper.selectOne(new QueryWrapper<Trading>().lambda().eq(Trading::getShareId, trading.getShareId()).eq(Trading::getDataStatus, trading.getDataStatus()).eq(Trading::getTradingAt,trading.getTradingAt()));
    }
}


